package cn.itcast.erp.service.impl;

import cn.itcast.erp.dao.mapper.CStoreoperMapper;
import cn.itcast.erp.entity.Storeoper;
import cn.itcast.erp.entity.utils.AjaxResult;
import cn.itcast.erp.service.CStoreoperService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 库存变动记录Service类
 *
 * @author 丛平
 * @date 2019/6/11
 */


@Service("storeoperService")
public class CStoreoperServiceImpl implements CStoreoperService {

    @Resource
    private CStoreoperMapper cStoreoperMapper;


    @Override
    public AjaxResult findStoreoper(Storeoper storeoper) {
        // TODO: 2019/6/14 代码格式不规范
        AjaxResult ar = new AjaxResult();
        int total = cStoreoperMapper.count(storeoper);
        List<Storeoper> list = cStoreoperMapper.findStoreoper(storeoper);
        ar.setTotal(total);
        ar.setRows(list);
        return ar;
    }


}
